package com.villaday.idf.adapter2;

import android.content.Context;
import android.view.View;

import com.villaday.idf.R;
import com.villaday.idf.base.AbsRecyclerViewAdapter;
import com.villaday.idf.model2.Find_House_minsu_listEntity;
import com.villaday.idf.model2.Modules_find_house_configurations;

/**
 * Created by tudou on 2018/10/8.
 */

public class MinSuInnerAdapter extends AbsRecyclerViewAdapter<Find_House_minsu_listEntity.BodyEntity.BusinessDistrictsEntity> {


    private int positionwaibu;
    private View.OnClickListener onClickListener;

    public MinSuInnerAdapter(Context context, int position, View.OnClickListener onClickListener) {
        super(context, R.layout.item_minsu_inner);
        this.positionwaibu = position;
        this.onClickListener = onClickListener;
    }


    @Override
    public void onBindHolder(AbsRecyclerViewAdapter.RecyclerViewHolder holder, Find_House_minsu_listEntity.BodyEntity.BusinessDistrictsEntity d, int position) {
        holder.bindTextView(R.id.tv_city, d.getName());
        View view = holder.getView(R.id.tv_city);
        view.setTag(R.id.tag_second, position);//内部position
        view.setTag(R.id.tag_first, positionwaibu);//外部position
        view.setOnClickListener(onClickListener);

        /*.setViewSelected(R.id.tv_city,d.isCheck());*/
    }
}
